#include<stdio.h>
int main(void){
    int n,num;
    int sum=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        num = 1;
        for(int j=1;j<=i;j++){
            num *= j;
        }
        sum += num;
    }
    printf("1!+2!+...+%d!=%d\n",n,sum);
    return 0;
}